package com.itheima.dao.impl;

import com.itheima.dao.UserDao;

import java.util.List;
import java.util.Map;

public class UserDaoImpl implements UserDao {
    public UserDaoImpl() {
        System.out.println("UserDaoImpl创建了");

    }
    //注入基本数据类型
    private String username;
    private Integer age;
    public void setUsername(String username) {
        this.username = username;
    }
    public void setAge(Integer age) {
        this.age = age;
    }

    //注入集合数据类型
    private List<String> stringList;
    private Map<String, String> map;

    public void setStringList(List<String> stringList) {
        this.stringList = stringList;
    }

    public void setMap(Map<String, String> map) {
        this.map = map;
    }


    @Override
    public String toString() {
        return "UserDaoImpl{" +
                "stringList=" + stringList +
                ", map=" + map +
                '}';
    }

    public void save() {
        System.out.println(map);
        /*System.out.println(stringList);
        System.out.println(username+"---------"+age);
        System.out.println("save()运行了");*/
    }
}
